package com.softright.net;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author lemon
 *
 */
public class MutilPartEntity {
	
	private static final String BOUNDARY = "---------7d4a6d158c9";
	
	private String boundary = BOUNDARY;
	
	private List<MutilPartBody> bodyList;
	
	public MutilPartEntity() {
		this.boundary = BOUNDARY;
	}
	
	public MutilPartEntity(List<MutilPartBody> bodyList) {
		this.boundary = BOUNDARY;
		this.bodyList = bodyList;
	}
	
	public MutilPartEntity(String boundary, List<MutilPartBody> bodyList) {
		this.boundary = boundary;
		this.bodyList = bodyList;
	}
	
	public void addBody(MutilPartBody body) {
		if(bodyList == null) {
			bodyList = new ArrayList<MutilPartBody>();
		}
		bodyList.add(body);
	}
	
	public List<MutilPartBody> getBodyList() {
		return bodyList;
	}

	public void setBodyList(List<MutilPartBody> bodyList) {
		this.bodyList = bodyList;
	}

	public String getBoundary() {
		return boundary;
	}

	public void setBoundary(String boundary) {
		this.boundary = boundary;
	}
}
